covariate.labels = c('MR: Deontological', 'MR: Consequentialist', 'MR: Dehumanization', 'MR: Empathy', 'Age', 'Female', 'Married', 'HS Degree', 'Kids', 'Social Aid', 'PTSD', 'Confidence in the State', 'Crime: Heard', 'Crime: Personal', 'Crime: Violent', 'Word Count', 'Constant'),
add.lines = list(c('Individual Controls', '', '\\checkmark', '\\checkmark', '\\checkmark',  '', '\\checkmark', '\\checkmark', '\\checkmark'),
c('Crime Controls', '', '', '\\checkmark', '\\checkmark',   '', '', '\\checkmark', '\\checkmark' )))
## Proportion of dehumanization cases that involve pref for lethal punishment
prop.table(table(dat$dehuman_uc, dat$lethal_pun==1), 1)
ggpredict(lethal_5, c('deonto_uc'), type = 're')
ggpredict(lethal_5, c('conseq_uc'), type = 're')
ggpredict(lethal_5, c('dehuman_uc'), type = 're')
ggpredict(lethal_5, c('human_uc'), type = 're')
ggpredict(let_phys_5, c('deonto_uc'), type = 're')
ggpredict(let_phys_5, c('conseq_uc'), type = 're')
ggpredict(let_phys_5, c('dehuman_uc'), type = 're')
ggpredict(let_phys_5, c('human_uc'), type = 're')
## clean up some variables
dat2$conf_mean <- as.numeric(dat2$conf_mean)
dat2$word_count_st <- (dat2$word_count - mean(dat2$word_count, na.rm=T))/sd(dat2$word_count, na.rm=T)
dat2$age_st <- (dat2$age - mean(dat2$age, na.rm=T))/sd(dat2$age, na.rm=T)
dat2$kids_st <- (dat2$kids - mean(dat2$kids, na.rm=T))/sd(dat2$kids, na.rm=T)
## create ind-level means of event-level predictors
dat2 <- dat2 %>%
group_by(participant) %>%
mutate(deonto_gmean = mean(deonto_uc, na.rm=T),
conseq_gmean = mean(conseq_uc, na.rm=T),
human_gmean = mean(human_uc, na.rm=T),
dehuman_gmean = mean(dehuman_uc, na.rm=T),
phy_cri_gmean = mean(phy_cri, na.rm=T),
rel_crime_hyp_gmean = mean(rel_crime=="Hypothetical", na.rm=T),
rel_crime_heard_gmean = mean(rel_crime=="Heard", na.rm=T),
rel_crime_pers_gmean = mean(rel_crime=="Personal", na.rm=T))
## Pref for lethal punishment only
lethal_1 <- glmer(lethal_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
(1 | participant), data = dat2, family = binomial(link = 'logit'))
lethal_2 <- glmer(lethal_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
age_st + female + married + hs_degree + kids_st +
soc_aid + ptsd + conf_mean + (1 | participant),
data = dat2, family = binomial(link = 'logit'),
control = glmerControl(optimizer = 'bobyqa'))
lethal_3 <- glmer(lethal_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
age_st + female + married + hs_degree + kids_st +
soc_aid + ptsd + conf_mean +
rel_crime +
phy_cri +
(1 | participant),
data = dat2, family = binomial(link = 'logit'),
control = glmerControl(optimizer = 'bobyqa'))
lethal_4 <- glmer(lethal_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
age_st + female + married + hs_degree + kids_st +
soc_aid + ptsd + conf_mean +
rel_crime +
phy_cri +
word_count_st +
(1 | participant),
data = dat2, family = binomial(link = 'logit'),
control = glmerControl(optimizer = 'bobyqa'))
lethal_5 <- glmer(lethal_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
deonto_gmean + conseq_gmean + human_gmean + dehuman_gmean +
phy_cri_gmean + rel_crime_hyp_gmean + rel_crime_heard_gmean +
age_st + female + married + hs_degree + kids_st +
soc_aid + ptsd + conf_mean +
rel_crime +
phy_cri +
word_count_st +
(1 | participant),
data = dat2, family = binomial(link = 'logit'),
control = glmerControl(optimizer = 'bobyqa'))
## Pref for any physical punishment
let_phys_1 <- glmer(let_phy_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
(1 | participant), data = dat2, family = binomial(link = 'logit'))
let_phys_2 <- glmer(let_phy_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
age_st + female + married + hs_degree + kids_st +
soc_aid + ptsd + conf_mean + (1 | participant),
data = dat2, family = binomial(link = 'logit'),
control = glmerControl(optimizer = 'bobyqa'))
let_phys_3 <- glmer(let_phy_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
age_st + female + married + hs_degree + kids_st +
soc_aid + ptsd + conf_mean +
rel_crime +
phy_cri +
(1 | participant),
data = dat2, family = binomial(link = 'logit'),
control = glmerControl(optimizer = 'bobyqa'))
let_phys_4 <- glmer(let_phy_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
age_st + female + married + hs_degree + kids_st +
soc_aid + ptsd + conf_mean +
rel_crime +
phy_cri +
word_count_st +
(1 | participant),
data = dat2, family = binomial(link = 'logit'),
control = glmerControl(optimizer = 'bobyqa'))
let_phys_5 <- glmer(let_phy_pun ~ deonto_uc + conseq_uc + dehuman_uc + human_uc +
deonto_gmean + conseq_gmean + human_gmean + dehuman_gmean +
phy_cri_gmean + rel_crime_hyp_gmean + rel_crime_heard_gmean +
age_st + female + married + hs_degree + kids_st +
soc_aid + ptsd + conf_mean +
rel_crime +
phy_cri +
word_count_st +
(1 | participant),
data = dat2, family = binomial(link = 'logit'),
control = glmerControl(optimizer = 'bobyqa'))
## Put models into a latex table
stargazer(lethal_1, lethal_2, lethal_3, lethal_4, lethal_5, let_phys_1, let_phys_2, let_phys_3, let_phys_4, let_phys_5,
no.space = T,
digits = 2,
type = 'latex',
omit = "_gmean",
covariate.labels = c('MR: Deontological', 'MR: Consequentialist', 'MR: Dehumanization', 'MR: Empathy', 'Age', 'Female', 'Married', 'HS Degree', 'Kids', 'Social Aid', 'PTSD', 'Confidence in the State', 'Crime: Heard', 'Crime: Personal', 'Crime: Violent', 'Word Count', 'Constant'),
add.lines = list(c('Individual Controls', '', '\\checkmark', '\\checkmark', '\\checkmark',  '', '\\checkmark', '\\checkmark', '\\checkmark'),
c('Crime Controls', '', '', '\\checkmark', '\\checkmark',   '', '', '\\checkmark', '\\checkmark' )))
###################################################
##### Haiti elite network project    			  	#####
##### network by family              					#####
##### 04 June 2018							            	#####
###################################################
## 1. merge centrality into family graph
## 2. plot neighborhood of bambam families
## 3. plot coup plotter and non-coup plotter comparison
library(RColorBrewer)
fam_graph <- read.graph('genealogy/fam_graph.graphml', format='graphml')
all <- read.csv('code/allfams.csv')
ind_tab <- read.csv('genealogy/gene_clean.csv')
#####
## check naming conventions
#####
ind_tab <- subset(ind_tab, select = c(no, name, last, sexe, pere, mere, spouse_1, spouse_2))
t <- ind_tab %>%
select(no_pere=no, name_pere=name, last_pere=last)
ind_tab <- merge(ind_tab, t, by.x = 'pere', by.y = 'no_pere', keep = all.x)
prop.table(table(ind_tab$last_pere==ind_tab$last))
prop.table(table(ind_tab$last_pere[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
t <- ind_tab %>%
select(no_spouse_1=no, name_spouse_1=name, last_spouse_1=last)
ind_tab <- merge(ind_tab, t, by.x = 'spouse_1', by.y = 'no_spouse_1', keep = all.x)
prop.table(table(ind_tab$last_spouse_1==ind_tab$last))
prop.table(table(ind_tab$last_spouse_1[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
#####
## text - number of marriages per family
#####
fam <- read.csv('code/fam.csv')
all <- read.csv('code/allfams.csv')
length(unique(all$fam))
length(unique(fam$fam))
mean(all$nind, na.rm=T)
mean(all$degree_all_uw, na.rm=T)
mean(fam$nind, na.rm=T)
mean(fam$degree_all_uw, na.rm=T)
#####
## output table of top 20 families
#####
## summarize info on top fams in importer dataset
tab <- fam %>%
select(fam, nind, degree_all_uw, bonw_02_wnind_st, biz, mil, pol, coup, immig, syrian, top_hs2) %>%
arrange(desc(bonw_02_wnind_st))
tab <- tab[1:25,]
rownames(tab) <- tab$fam
tab$fam=NULL
xtable(tab)
## summarize fams each is connected to
top_fams <- tab$fam
top_graph <- induced_subgraph(fam_graph, v = which(V(fam_graph)$name %in% top_fams))
###########################################################
##### Haiti elite network project    	          			#####
##### master code			 			                      		#####
##### 2014 feb 04                   									#####
###########################################################
## clear workspace
rm(list=ls())
## set working directory
setwd('/Users/leyou/Dropbox/Haiti_trade/replication_files/Haiti_trade_20160307/Haiti_trade')
##########
## functions
##########
source('code/functions.R')
###################################################
##### Haiti elite network project    			  	#####
##### network by family              					#####
##### 04 June 2018							            	#####
###################################################
## 1. merge centrality into family graph
## 2. plot neighborhood of bambam families
## 3. plot coup plotter and non-coup plotter comparison
library(RColorBrewer)
fam_graph <- read.graph('genealogy/fam_graph.graphml', format='graphml')
all <- read.csv('code/allfams.csv')
ind_tab <- read.csv('genealogy/gene_clean.csv')
#####
## check naming conventions
#####
ind_tab <- subset(ind_tab, select = c(no, name, last, sexe, pere, mere, spouse_1, spouse_2))
t <- ind_tab %>%
select(no_pere=no, name_pere=name, last_pere=last)
ind_tab <- merge(ind_tab, t, by.x = 'pere', by.y = 'no_pere', keep = all.x)
prop.table(table(ind_tab$last_pere==ind_tab$last))
prop.table(table(ind_tab$last_pere[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
t <- ind_tab %>%
select(no_spouse_1=no, name_spouse_1=name, last_spouse_1=last)
ind_tab <- merge(ind_tab, t, by.x = 'spouse_1', by.y = 'no_spouse_1', keep = all.x)
prop.table(table(ind_tab$last_spouse_1==ind_tab$last))
prop.table(table(ind_tab$last_spouse_1[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
#####
## text - number of marriages per family
#####
fam <- read.csv('code/fam.csv')
all <- read.csv('code/allfams.csv')
length(unique(all$fam))
length(unique(fam$fam))
mean(all$nind, na.rm=T)
mean(all$degree_all_uw, na.rm=T)
mean(fam$nind, na.rm=T)
mean(fam$degree_all_uw, na.rm=T)
#####
## output table of top 20 families
#####
## summarize info on top fams in importer dataset
tab <- fam %>%
select(fam, nind, degree_all_uw, bonw_02_wnind_st, biz, mil, pol, coup, immig, syrian, top_hs2) %>%
arrange(desc(bonw_02_wnind_st))
tab <- tab[1:25,]
rownames(tab) <- tab$fam
tab$fam=NULL
xtable(tab)
## summarize fams each is connected to
top_fams <- tab$fam
top_graph <- induced_subgraph(fam_graph, v = which(V(fam_graph)$name %in% top_fams))
###################################################
##### Haiti elite network project    			  	#####
##### network by family              					#####
##### 04 June 2018							            	#####
###################################################
## 1. merge centrality into family graph
## 2. plot neighborhood of bambam families
## 3. plot coup plotter and non-coup plotter comparison
library(RColorBrewer)
fam_graph <- read.graph('genealogy/fam_graph.graphml', format='graphml')
all <- read.csv('code/allfams.csv')
ind_tab <- read.csv('genealogy/gene_clean.csv')
#####
## check naming conventions
#####
ind_tab <- subset(ind_tab, select = c(no, name, last, sexe, pere, mere, spouse_1, spouse_2))
t <- ind_tab %>%
select(no_pere=no, name_pere=name, last_pere=last)
ind_tab <- merge(ind_tab, t, by.x = 'pere', by.y = 'no_pere', keep = all.x)
prop.table(table(ind_tab$last_pere==ind_tab$last))
prop.table(table(ind_tab$last_pere[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
t <- ind_tab %>%
select(no_spouse_1=no, name_spouse_1=name, last_spouse_1=last)
ind_tab <- merge(ind_tab, t, by.x = 'spouse_1', by.y = 'no_spouse_1', keep = all.x)
prop.table(table(ind_tab$last_spouse_1==ind_tab$last))
prop.table(table(ind_tab$last_spouse_1[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
#####
## text - number of marriages per family
#####
fam <- read.csv('code/fam.csv')
all <- read.csv('code/allfams.csv')
length(unique(all$fam))
length(unique(fam$fam))
mean(all$nind, na.rm=T)
mean(all$degree_all_uw, na.rm=T)
mean(fam$nind, na.rm=T)
mean(fam$degree_all_uw, na.rm=T)
#####
## output table of top 20 families
#####
## summarize info on top fams in importer dataset
tab <- fam %>%
select(fam, nind, degree_all_uw, bonw_02_wnind_st, biz, mil, pol, coup, immig, syrian, top_hs2) %>%
arrange(desc(bonw_02_wnind_st))
tab <- tab[1:25,]
rownames(tab) <- tab$fam
tab$fam=NULL
xtable(tab)
## summarize fams each is connected to
top_fams <- tab$fam
top_graph <- induced_subgraph(fam_graph, v = which(V(fam_graph)$name %in% top_fams))
library(plyr)
###################################################
##### Haiti elite network project    			  	#####
##### network by family              					#####
##### 04 June 2018							            	#####
###################################################
## 1. merge centrality into family graph
## 2. plot neighborhood of bambam families
## 3. plot coup plotter and non-coup plotter comparison
library(RColorBrewer)
library(plyr)
fam_graph <- read.graph('genealogy/fam_graph.graphml', format='graphml')
all <- read.csv('code/allfams.csv')
ind_tab <- read.csv('genealogy/gene_clean.csv')
#####
## check naming conventions
#####
ind_tab <- subset(ind_tab, select = c(no, name, last, sexe, pere, mere, spouse_1, spouse_2))
t <- ind_tab %>%
select(no_pere=no, name_pere=name, last_pere=last)
ind_tab <- merge(ind_tab, t, by.x = 'pere', by.y = 'no_pere', keep = all.x)
prop.table(table(ind_tab$last_pere==ind_tab$last))
prop.table(table(ind_tab$last_pere[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
t <- ind_tab %>%
select(no_spouse_1=no, name_spouse_1=name, last_spouse_1=last)
ind_tab <- merge(ind_tab, t, by.x = 'spouse_1', by.y = 'no_spouse_1', keep = all.x)
prop.table(table(ind_tab$last_spouse_1==ind_tab$last))
prop.table(table(ind_tab$last_spouse_1[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
#####
## text - number of marriages per family
#####
fam <- read.csv('code/fam.csv')
all <- read.csv('code/allfams.csv')
length(unique(all$fam))
length(unique(fam$fam))
mean(all$nind, na.rm=T)
mean(all$degree_all_uw, na.rm=T)
mean(fam$nind, na.rm=T)
mean(fam$degree_all_uw, na.rm=T)
#####
## output table of top 20 families
#####
## summarize info on top fams in importer dataset
tab <- fam %>%
select(fam, nind, degree_all_uw, bonw_02_wnind_st, biz, mil, pol, coup, immig, syrian, top_hs2) %>%
arrange(desc(bonw_02_wnind_st))
library(dplyr)
tab <- fam %>%
select(fam, nind, degree_all_uw, bonw_02_wnind_st, biz, mil, pol, coup, immig, syrian, top_hs2) %>%
arrange(desc(bonw_02_wnind_st))
tab <- tab[1:25,]
rownames(tab) <- tab$fam
tab$fam=NULL
xtable(tab)
## summarize fams each is connected to
top_fams <- tab$fam
top_graph <- induced_subgraph(fam_graph, v = which(V(fam_graph)$name %in% top_fams))
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'))
###################################################
##### Haiti elite network project    			  	#####
##### network by family              					#####
##### 04 June 2018							            	#####
###################################################
## 1. merge centrality into family graph
## 2. plot neighborhood of bambam families
## 3. plot coup plotter and non-coup plotter comparison
library(RColorBrewer)
library(plyr)
fam_graph <- read.graph('genealogy/fam_graph.graphml', format='graphml')
all <- read.csv('code/allfams.csv')
ind_tab <- read.csv('genealogy/gene_clean.csv')
#####
## check naming conventions
#####
ind_tab <- subset(ind_tab, select = c(no, name, last, sexe, pere, mere, spouse_1, spouse_2))
t <- ind_tab %>%
select(no_pere=no, name_pere=name, last_pere=last)
ind_tab <- merge(ind_tab, t, by.x = 'pere', by.y = 'no_pere', keep = all.x)
prop.table(table(ind_tab$last_pere==ind_tab$last))
prop.table(table(ind_tab$last_pere[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
t <- ind_tab %>%
select(no_spouse_1=no, name_spouse_1=name, last_spouse_1=last)
ind_tab <- merge(ind_tab, t, by.x = 'spouse_1', by.y = 'no_spouse_1', keep = all.x)
prop.table(table(ind_tab$last_spouse_1==ind_tab$last))
prop.table(table(ind_tab$last_spouse_1[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
#####
## text - number of marriages per family
#####
fam <- read.csv('code/fam.csv')
all <- read.csv('code/allfams.csv')
length(unique(all$fam))
length(unique(fam$fam))
mean(all$nind, na.rm=T)
mean(all$degree_all_uw, na.rm=T)
mean(fam$nind, na.rm=T)
mean(fam$degree_all_uw, na.rm=T)
#####
## output table of top 20 families
#####
## summarize info on top fams in importer dataset
tab <- fam %>%
select(fam, nind, degree_all_uw, bonw_02_wnind_st, biz, mil, pol, coup, immig, syrian, top_hs2) %>%
arrange(desc(bonw_02_wnind_st))
tab <- tab[1:25,]
rownames(tab) <- tab$fam
tab$fam=NULL
xtable(tab)
## summarize fams each is connected to
top_fams <- tab$fam
top_graph <- induced_subgraph(fam_graph, v = which(V(fam_graph)$name %in% top_fams))
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'))
plot(top_graph)
## summarize fams each is connected to
top_fams <- tab$fam
top_fams
tab
## summarize fams each is connected to
top_fams <- rownames(tab$fam)
top_graph <- induced_subgraph(fam_graph, v = which(V(fam_graph)$name %in% top_fams))
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'))
top_fams
## summarize fams each is connected to
top_fams <- rownames(tab)
top_fams
top_graph <- induced_subgraph(fam_graph, v = which(V(fam_graph)$name %in% top_fams))
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'))
colnames(V(fam_graph))
V(fam_graph)$size
View(fam_graph)
vertex_attr(fam_graph)
vertex_attr_names(fam_graph)
###################################################
##### Haiti elite network project    			  	#####
##### network by family              					#####
##### 04 June 2018							            	#####
###################################################
## 1. merge centrality into family graph
## 2. plot neighborhood of bambam families
## 3. plot coup plotter and non-coup plotter comparison
library(RColorBrewer)
library(dplyr)
fam_graph <- read.graph('genealogy/fam_graph.graphml', format='graphml')
all <- read.csv('code/allfams.csv')
ind_tab <- read.csv('genealogy/gene_clean.csv')
#####
## check naming conventions
#####
ind_tab <- subset(ind_tab, select = c(no, name, last, sexe, pere, mere, spouse_1, spouse_2))
t <- ind_tab %>%
select(no_pere=no, name_pere=name, last_pere=last)
ind_tab <- merge(ind_tab, t, by.x = 'pere', by.y = 'no_pere', keep = all.x)
prop.table(table(ind_tab$last_pere==ind_tab$last))
prop.table(table(ind_tab$last_pere[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
t <- ind_tab %>%
select(no_spouse_1=no, name_spouse_1=name, last_spouse_1=last)
ind_tab <- merge(ind_tab, t, by.x = 'spouse_1', by.y = 'no_spouse_1', keep = all.x)
prop.table(table(ind_tab$last_spouse_1==ind_tab$last))
prop.table(table(ind_tab$last_spouse_1[ind_tab$sexe=="FEMME"]==ind_tab$last[ind_tab$sexe=="FEMME"]))
#####
## text - number of marriages per family
#####
fam <- read.csv('code/fam.csv')
all <- read.csv('code/allfams.csv')
length(unique(all$fam))
length(unique(fam$fam))
mean(all$nind, na.rm=T)
mean(all$degree_all_uw, na.rm=T)
mean(fam$nind, na.rm=T)
mean(fam$degree_all_uw, na.rm=T)
#####
## output table of top 20 families
#####
## summarize info on top fams in importer dataset
tab <- fam %>%
select(fam, nind, degree_all_uw, bonw_02_wnind_st, biz, mil, pol, coup, immig, syrian, top_hs2) %>%
arrange(desc(bonw_02_wnind_st))
tab <- tab[1:25,]
rownames(tab) <- tab$fam
tab$fam=NULL
xtable(tab)
#####
## merge centrality into fam network
#####
# give everyone positive centrality for size
all$bonw_02_wnind_size <- all$bonw_02_wnind_st - (min(all$bonw_02_wnind_st, na.rm=T)) + 0.01
all <- subset(all, select = c(fam, degree_all_uw, bonw_02_wnind_size, fastgreedy))
## merge centrality into graph object
fam_att <- vertex_attr(fam_graph)
fam_att <- merge(fam_att, all, by.x = 'name', by.y = 'fam', all.x = T)
fam_mat <- get.data.frame(fam_graph, what=c('edges'))
fam_graph <- graph.data.frame(fam_mat,vertices=fam_att,directed=F)
## create all elite and biz elite subgraphs
biz_graph <- induced_subgraph(fam_graph, which(V(fam_graph)$biz==1))
all_graph <- induced_subgraph(fam_graph, which(V(fam_graph)$biz==1 | V(fam_graph)$pol==1 | V(fam_graph)$mil==1))
#####
## plot top 25 fams
#####
top_fams <- rownames(tab)
top_graph <- induced_subgraph(fam_graph, v = which(V(fam_graph)$name %in% top_fams))
V(top_graph)$bonw_02_wnind_st
V(top_graph)$bonw_02_wnind
vertex_attr_names(top_graph)
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'),
vertex.size = V(top_graph)$bonw_02_wnind_size)
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'),
vertex.size = V(top_graph)$bonw_02_wnind_size*10)
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'),
vertex.size = V(top_graph)$bonw_02_wnind_size*10,
vertex.label.dist = 1)
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'),
vertex.size = V(top_graph)$bonw_02_wnind_size*10,
vertex.label.dist = 2)
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'),
vertex.size = V(top_graph)$bonw_02_wnind_size*10,
vertex.label.dist = 3)
pdf('code/graphs/top_fams.pdf')
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'),
vertex.size = V(top_graph)$bonw_02_wnind_size*10,
vertex.label.dist = 1)
dev.off()
pdf('code/graphs/top_fams.pdf')
plot(top_graph,
vertex.color = ifelse(V(top_graph)$coup==1, 'red', 'grey'),
vertex.size = V(top_graph)$bonw_02_wnind_size*10,
vertex.label.dist = 2)
dev.off()
